home *** CD-ROM | disk | FTP | other *** search
- ;
- ; Installation script for the bgui.library (OS 2.0)
- ;
-
- ; Strings
-
- (set @default-dest "")
- (set lib-source "libs/bgui.library")
- (set lib-def-dest "LIBS:")
- (set lib-to "Where do you want bgui.library copied to?")
- (set lib-help
- (cat "If you have a special directory setup for third-party\n"
- "libraries you can select it here.\n\n\n"
- )
- )
- (set gad-source "gadgets/textfield.gadget")
- (set gad-def-dest "SYS:Classes/Gadgets")
- (set gad-to "Where do you want textfield.gadget copied to?")
- (set gad-help
- (cat "If you have a special directory setup for third-party\n"
- "gadgets you can select it here. If you are running\n"
- "Kickstart 2.04 set this to LIBS:\n\n\n"
- )
- )
- (set files-def-dest "Work:GDMail")
- (set files-to "Where do you want the GDMail files copied to?")
- (set files-help
- (cat "The GDMail distribution files will be copied to the\n"
- "selected directory.\n\n\n"
- )
- )
- (set heir-def-dest "Work:UUCP")
- (set heir-to "Where do you want the UUCP hierarchy to be created?")
- (set heir-help
- (cat "A UUCP directory and sub-directories will be created in the "
- "selected directory.\n\n\n"
- )
- )
- (set wrong-kick "You must be running Kickstart 2.04 to use the bgui.library.")
- (set copy-msg "Copying the bgui.library to ")
- (set hail-msg
- (cat "\n\n\nGDMail Installation Script.\n"
- "This script will install the GDMail distribution including "
- "bgui.library and textfield.gadget on your Amiga.\n\n"
- "GDMail is © 1994-1995 Stan Burton\n"
- "bgui.library is © 1993-1994 Jaba Development\n"
- "textfield.gadget is © 1994 Mark Thomas\n"
- "All Rights Reserved."
- )
- )
-
- ; Correct OS version?
-
- (if (< (/ (getversion) 65536) 37) (abort wrong-kick))
-
- (message hail-msg)
-
- (if (> 1 (exists "UUCP:" (noreq)))
- (
-
- ; Ask create UUCP:
- (set answer
- (askbool
- (prompt "You do not currently have a UUCP: assignment\n\n"
- "While UUCP is not required for GDMail, some of its "
- "assignments are used by GDMail.\n\n\n"
- "Do you wish to create the required heirarchy and assignments "
- "and place the assignments in your startup?")
- (help "GDMail requires that the logical assignments UUMAIL: and UULIB: "
- "be available. If you like, the installer will create a small "
- "heirarchy of mostly empty directories and the required assignments. "
- "Note that GDMail requires a sendmail program to distribute any "
- "mail you send. Sendmail may require other directories and assignments in "
- "this heirarchy.")
- )
- )
- (if answer
- (
-
- ; Ask where to create the heirarchy.
-
- (set lib-dest
- (askdir
- (prompt heir-to)
- (help heir-help)
- (default heir-def-dest)
- )
- )
-
- ; Create the heirarchy
- (makedir (tackon lib-dest "UUCP")
- (prompt)
- )
- (makedir (tackon lib-dest "UUCP/UUMail")
- (prompt)
- )
- (makedir (tackon lib-dest "UUCP/UULib")
- (prompt)
- )
- (makeassign "UUCP" (tackon lib-dest "UUCP")
- )
- (makeassign "UUMail" (tackon lib-dest "UUCP/UUMail")
- )
- (makeassign "UULib" (tackon lib-dest "UUCP/UULib")
- )
- (copyfiles
- (source "Config")
- (dest "UULib:")
- )
- (startup "UUCP"
- (prompt "prompt")
- (help "help")
- (command (cat "Assign UUCP: " (tackon lib-dest "UUCP\n")))
- (command "Assign UUMail: UUCP:UUMail\n")
- (command "Assign UULib: UUCP:UULib\n")
- )
- )
- )
- )
- )
-
- ; Ask where to copy the library.
-
- (set lib-dest
- (askdir
- (prompt lib-to)
- (help lib-help)
- (default lib-def-dest)
- )
- )
-
- ; Copy the library.
-
- (copylib
- (prompt (cat copy-msg (tackon lib-dest "bgui.library") "..."))
- (help @copylib-help)
- (source lib-source)
- (dest lib-dest)
- (confirm)
- )
-
- ; Ask where to copy the gadget.
-
- (set gad-dest
- (askdir
- (prompt gad-to)
- (help gad-help)
- (default gad-def-dest)
- )
- )
-
- ; Copy the gadget.
-
- (copylib
- (prompt (cat copy-msg (tackon gad-dest "textfield.gadget") "..."))
- (help @copygad-help)
- (source gad-source)
- (dest gad-dest)
- (confirm)
- )
-
- ; Ask install the files.
- (set files-dest (expandpath ""))
- (set answer
- (askbool
- (prompt "If you did not dearchive or copy the GDMail "
- "distribution files into the desired directory "
- "the installation will now copy them into the directory you choose.\n\n\n"
- "Do you wish to install the GDMail files?")
- (help "Many people dearchive archived files into a directory "
- "or volume other than the one that they want to "
- "install into. Often this is the Ram: volume. If "
- "this is what you did then choose Yes and you "
- "will be prompted for the directory to copy the required files to.")
- )
- )
- (if answer
- (
-
- ; Ask where to copy the files.
- (set files-dest
- (askdir
- (prompt files-to)
- (help files-help)
- (default files-def-dest)
- )
- )
-
- ; Copy the files.
- (copyfiles
- (source "")
- (dest files-dest)
- (choices "GDMail" "README" "TextField.doc" "mailtogd" "GDMail.doc" "MailTool.cd" ".dmailrc")
- (infos)
- )
- (set bookname (cat (getenv "user") ".book"))
- (if (> 1 (exists bookname (noreq)))
- (
- (copyfiles
- (source "example.book")
- (dest files-dest)
- (newname bookname)
- )
- )
- )
- )
- )
-
- ; Ask create GDMail path
- (set answer
- (askbool
- (prompt "Some of the features of GDMail require that GDMail "
- "be in your path.\n\n\n"
- "Do you wish to have a GDMail path command added to your startup?")
- (help "GDMail requires the path for access to the mailtoGD program for "
- "sending MIME mail. The path may also be required for other programs "
- "now or in the future. NOTE: It is not sufficient to use an alias "
- "in your shell startup.")
- )
- )
- (if answer
- (
-
- ; Create the path
- (startup "GDMail"
- (prompt "prompt")
- (help "help")
- (command (cat "Path " files-dest " add\n"))
- )
- )
- )
-
- (if (> 1 (exists "UULIB:.dmailrc" (noreq)))
- (
-
- ; Ask install the default .dmailrc file.
- (set answer
- (askbool
- (prompt "You do not currently have a .dmailrc file\n\n\n"
- "Do you wish to create a .dmailrc file?")
- (help "The .dmailrc file configures the way GDMail works for "
- "you. If you have not previously installed DMail "
- "or GDMail the installer will let you create a "
- ".dmailrc file.")
- )
- )
- (if answer
- (
-
- ; Get .dmailrc options
- (set answer
- (askoptions
- (choices "mime_automatic"
- "reverse_display"
- "text_plain_is_mime"
- "use_book"
- "use_custom_screen"
- "view_by_name"
- )
- (default $20)
- (prompt "Choose Configuration Options")
- (help
- (cat "mime_automatic - MIME formatted messages will be handled "
- "automatically if this variable is set, otherwise "
- "GDMail will ask you what to do when a MIME message arrives.\n\n"
- "reverse_display - By default, GDMail displays mail "
- "messages newest first. If you would like the messages to "
- "be displayed oldest first, set this variable.\n\n"
- "text_plain_is_mime - MIME formatted messages of the "
- "type text/plain can be read easily within GDMail. If "
- "you would rather do this than using the MIME reader, then "
- "do not set this variable, otherwise ALL types of MIME messages "
- "are passed to the MIME handling program.\n\n"
- "use_book - GDMail contains a directory for user names "
- "and addresses that can be used as destinations for your "
- "mail messages. If you always want to choose names from this "
- "directory set this variable.\n\n"
- "use_custom_screen - GDMail will try to open its window on the system "
- "public screen, usually WorkBench or on the public screen "
- "specified in the variable pub_screen_name, unless this "
- "variable is set. If set, GDMail will open on a "
- "custom public screen.\n\n"
- "view_by_name - By default GDMail displays the users "
- "address in the message list. If you would rather have "
- "the users name (if available) displayed, set this variable."
- )
- )
- )
- )
- (if (<> (BITAND answer $01) 0)
- (set T1 "set mime_automatic TRUE\n")
- (set T1 "set mime_automatic (TRUE)\n")
- )
- (if (<> (BITAND answer $02) 0)
- (set T2 "set reverse_display TRUE\n")
- (set T2 "set reverse_display (TRUE)\n")
- )
- (if (<> (BITAND answer $04) 0)
- (set T3 "set text_plain_is_mime TRUE\n")
- (set T3 "set text_plain_is_mime (TRUE)\n")
- )
- (if (<> (BITAND answer $08) 0)
- (set T4 "set use_book TRUE\n")
- (set T4 "set use_book (TRUE)\n")
- )
- (if (<> (BITAND answer $10) 0)
- (set T5 "set use_custom_screen TRUE\n")
- (set T5 "set use_custom_screen (TRUE)\n")
- )
- (if (<> (BITAND answer $20) 0)
- (set T6 "set view_by_name TRUE\n")
- (set T6 "set view_by_name (TRUE)\n")
- )
-
- ; Write .dmailrc
- (textfile
- (dest "UULIB:.dmailrc")
- (append "set headfile uulib:$user$.header\n")
- (append "set sigfile uulib:$user$.signature\n")
- (append "set replyfields \"Reply-To: Return-Path:\"\n")
- (append "set _headchar >\n")
- (append T1)
- (append T2)
- (append T3)
- (append T4)
- (append T5)
- (append T6)
- )
- )
- )
- )
- )
-